package good_src.Interfaces;

import java.util.Observer;

/**
 * <p>
 * 
 * @author Tangi Midy & Fabien Le Peih
 *         </p>
 *         <p>
 *         Interface Subject extends Observable
 *         </p>
 */
public interface Subject<T> {

	public void detach(Observer observer);

	public void attach(Observer observer);

	/**
	 * <p>Calls a method request that enable the update of the displayers</p>
	 * <p>Used for Canal</p>
	 */
	public void update();

	/**
	 * 
	 * @return the current value
	 */
	public T getValue();

	/**
	 * Updates its value and calls strategies
	 */
	void tick();
	
	/**
	 * 
	 * @return the selected strategy
	 */
	public Algorithme getStrategy();
	
	/**
	 * Sets the selected strategy
	 * @param algo the strategy to set
	 */
	public void setStrategy(Algorithme algo);
	
	/**
	 * 
	 * @return value's version (if versionned Strategy selected) else return -1
	 */
	public int getVersion();

	/**
	 * Set the displayers
	 * @param displayers the number to set
	 */
	public void setCanaux(int displayers);

}
